<!DOCTYPE html>












  


<html class="theme-next mist use-motion" lang="zh-CN">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2"/>
<meta name="theme-color" content="#222">









  
  
  <link rel="stylesheet" media="all" href="/lib/Han/dist/han.min.css?v=3.3">




<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />



















  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.lug.ustc.edu.cn/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=6.4.2" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.jpg?v=6.4.2">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.jpg?v=6.4.2">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.jpg?v=6.4.2">


  <link rel="mask-icon" href="/images/logo.svg?v=6.4.2" color="#222">









<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Mist',
    version: '6.4.2',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: false,
    fastclick: false,
    lazyload: false,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  




  <meta property="og:type" content="article">
<meta property="og:title" content="原型设计与PRD入门">
<meta property="og:url" content="https://devzhao.com/post/740368dd.html">
<meta property="og:site_name" content="学而时习之">
<meta property="og:locale" content="zh-CN">
<meta property="og:image" content="http://qnfile.devzhao.com/blog/2018-11-15-160828.jpg">
<meta property="og:image" content="http://qnfile.devzhao.com/blog/2018-11-16-161418.jpg">
<meta property="og:image" content="http://qnfile.devzhao.com/blog/2018-11-16-161842.jpg">
<meta property="og:image" content="http://qnfile.devzhao.com/blog/2018-11-16-163126.jpg">
<meta property="og:image" content="http://qnfile.devzhao.com/blog/2018-11-16-163643.jpg">
<meta property="og:image" content="http://qnfile.devzhao.com/blog/2018-11-16-163821.jpg">
<meta property="og:image" content="http://qnfile.devzhao.com/blog/2018-11-16-164110.jpg">
<meta property="og:image" content="http://qnfile.devzhao.com/blog/2018-11-16-164330.jpg">
<meta property="og:image" content="http://qnfile.devzhao.com/blog/2018-11-16-164625.jpg">
<meta property="og:image" content="http://qnfile.devzhao.com/blog/2018-11-16-165606.jpg">
<meta property="og:image" content="http://qnfile.devzhao.com/blog/2018-11-16-171239.jpg">
<meta property="og:image" content="http://qnfile.devzhao.com/blog/2018-11-16-171424.jpg">
<meta property="og:image" content="http://qnfile.devzhao.com/blog/2018-11-16-171802.jpg">
<meta property="og:image" content="http://qnfile.devzhao.com/blog/2018-11-16-171841.jpg">
<meta property="og:image" content="http://qnfile.devzhao.com/blog/2018-11-16-172723.jpg">
<meta property="og:image" content="http://qnfile.devzhao.com/blog/2018-11-16-172823.jpg">
<meta property="og:image" content="http://qnfile.devzhao.com/blog/2018-11-16-172845.jpg">
<meta property="og:image" content="http://qnfile.devzhao.com/blog/2018-11-16-172957.jpg">
<meta property="og:image" content="http://qnfile.devzhao.com/blog/2018-11-16-174010.jpg">
<meta property="og:image" content="http://qnfile.devzhao.com/blog/2018-11-16-174553.jpg">
<meta property="og:updated_time" content="2018-11-17T03:53:25.441Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="原型设计与PRD入门">
<meta name="twitter:image" content="http://qnfile.devzhao.com/blog/2018-11-15-160828.jpg">






  <link rel="canonical" href="https://devzhao.com/post/740368dd.html"/>



<script type="text/javascript" id="page.configurations">
  CONFIG.page = {
    sidebar: "",
  };
</script>

  <title>原型设计与PRD入门 | 学而时习之</title>
  






  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?b8fcd96e6d9e134b3c9551097ed074a4";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>




  <noscript>
  <style type="text/css">
    .use-motion .motion-element,
    .use-motion .brand,
    .use-motion .menu-item,
    .sidebar-inner,
    .use-motion .post-block,
    .use-motion .pagination,
    .use-motion .comments,
    .use-motion .post-header,
    .use-motion .post-body,
    .use-motion .collection-title { opacity: initial; }

    .use-motion .logo,
    .use-motion .site-title,
    .use-motion .site-subtitle {
      opacity: initial;
      top: initial;
    }

    .use-motion {
      .logo-line-before i { left: initial; }
      .logo-line-after i { right: initial; }
    }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN">

  <div id="showImgFullScrn" style="display: none;"><img id="showImgFullScrnImg" src="" style="max-height:100%"></div>

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">学而时习之</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
    
      
        <h1 class="site-subtitle" itemprop="description">时间就是力量</h1>
      
    
  </div>

  <div class="site-nav-toggle">
    <button aria-label="切换导航栏">
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>



<nav class="site-nav">
  
    <ul id="menu" class="menu">
      
        
        
        
          
          <li class="menu-item menu-item-home">
    <a href="/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-home"></i> <br />首页</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-shortcut">
    <a href="/shortcut/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-shirtsinbulk"></i> <br />快捷</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-archives">
    <a href="/archives/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />归档</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-categories">
    <a href="/categories/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-th"></i> <br />分类</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-tags">
    <a href="/tags/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />标签</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-about">
    <a href="/about/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-user"></i> <br />关于</a>
  </li>

      
      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br />搜索</a>
        </li>
      
    </ul>
  

  
    

  

  
    <div class="site-search">
      
  <div class="popup search-popup local-search-popup">
  <div class="local-search-header clearfix">
    <span class="search-icon">
      <i class="fa fa-search"></i>
    </span>
    <span class="popup-btn-close">
      <i class="fa fa-times-circle"></i>
    </span>
    <div class="local-search-input-wrapper">
      <input autocomplete="off"
             placeholder="搜索..." spellcheck="false"
             type="text" id="local-search-input">
    </div>
  </div>
  <div id="local-search-result"></div>
</div>



    </div>
  
</nav>



  



</div>
    </header>

    


    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://devzhao.com/post/740368dd.html">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="zhaohan">
      <meta itemprop="description" content="教，是最好的学">
      <meta itemprop="image" content="http://qnfile.devzhao.com/blog/2018-10-12-125720.jpg#/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="学而时习之">
    </span>

    
      <header class="post-header">

        
        
          <h2 class="post-title" itemprop="name headline">原型设计与PRD入门
              
            
          </h2>
        

        <div class="post-meta">
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2018-11-15 23:49:29" itemprop="dateCreated datePublished" datetime="2018-11-15T23:49:29+08:00">2018-11-15</time>
            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/产品/" itemprop="url" rel="index"><span itemprop="name">产品</span></a></span>

                
                
                  ，
                
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/产品/原型设计与PRD/" itemprop="url" rel="index"><span itemprop="name">原型设计与PRD</span></a></span>

                
                
              
            </span>
          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/post/740368dd.html#comments" itemprop="discussionUrl">
                  <span class="post-meta-item-text">评论数：</span> <span class="post-comments-count valine-comment-count" data-xid="/post/740368dd.html" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          
             <span id="/post/740368dd.html" class="leancloud_visitors" data-flag-title="原型设计与PRD入门">
               <span class="post-meta-divider">|</span>
               <span class="post-meta-item-icon">
                 <i class="fa fa-eye"></i>
               </span>
               
                 <span class="post-meta-item-text">阅读次数：</span>
               
                 <span class="leancloud-visitors-count"></span>
             </span>
          

          

          
            <div class="post-symbolscount">
              

              
                <span class="post-meta-item-icon">
                  <i class="fa fa-file-word-o"></i>
                </span>
                
                  <span class="post-meta-item-text">本文字数：</span>
                
                <span title="本文字数">2.5k</span>
              

              

              
            </div>
          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body han-init-context" itemprop="articleBody">

      
      

      
        <p><img class="zhao-img-h153" src="http://qnfile.devzhao.com/blog/2018-11-15-160828.jpg"></p>
<a id="more"></a>
<p>原型和PRD是产品经理的主要产出物，和上一章功能和流程是紧密相关的，可以说他们是功能和流程的可视化。</p>
<p>原型和PRD绘制时有一些技巧和规律可循。其中很重要的一部分是工具的使用，聪明的大家去摸索一下就会很熟悉</p>
<h2 id="页面流程与页面结构图"><a href="#页面流程与页面结构图" class="headerlink" title="页面流程与页面结构图"></a>页面流程与页面结构图</h2><h3 id="页面流程图"><a href="#页面流程图" class="headerlink" title="页面流程图"></a>页面流程图</h3><h4 id="了解页面流程图"><a href="#了解页面流程图" class="headerlink" title="了解页面流程图"></a>了解页面流程图</h4><ul>
<li><p>交互设计/原型设计的底子，基本依据</p>
</li>
<li><p>代表用户的操作过程，先作业面流程能快速发现体验问题</p>
</li>
<li><p>突出页面重点元素与逻辑关系，提升原型设计的效率</p>
</li>
</ul>
<p>eg:</p>
<p><img src="http://qnfile.devzhao.com/blog/2018-11-16-161418.jpg" alt=""></p>
<h5 id="页面流程图和信息架构图的区别"><a href="#页面流程图和信息架构图的区别" class="headerlink" title="页面流程图和信息架构图的区别"></a>页面流程图和信息架构图的区别</h5><p><img src="http://qnfile.devzhao.com/blog/2018-11-16-161842.jpg" alt=""></p>
<ul>
<li><p>页面流程图，以用户视角，主要看流程的合理性</p>
</li>
<li><p>信息架构图，以产品视角，主要看包含多少功能点</p>
</li>
<li><p>页面流程图适合于条状比较复杂的产品功能，如电商、社交产品</p>
</li>
<li><p>信息架构图适合于层级比较分明的，如音乐产品、新闻客户端、阅读类产品等</p>
</li>
</ul>
<h5 id="页面流程图包含什么？"><a href="#页面流程图包含什么？" class="headerlink" title="页面流程图包含什么？"></a>页面流程图包含什么？</h5><ul>
<li><p><strong>四方形：</strong> 业务流程中四方形部分，异常流程为tips或者弹层</p>
</li>
<li><p><strong>流向：</strong> 主干流向和辅助流向</p>
</li>
<li><p><strong>重点元素：</strong> 每个流程中，重点体现和表达的内容是什么？</p>
</li>
</ul>
<h5 id="画页面流程图的工具"><a href="#画页面流程图的工具" class="headerlink" title="画页面流程图的工具"></a>画页面流程图的工具</h5><ul>
<li><p>axure就足够了，因为花了页面流程紧接着就是原型图</p>
</li>
<li><p>PPT也可以，快二容易讲解</p>
</li>
</ul>
<hr>
<p>后面以这样的一个需求作为案例讲解：</p>
<p><img src="http://qnfile.devzhao.com/blog/2018-11-16-163126.jpg" alt=""></p>
<h4 id="回归到业务业务流程，明确主线"><a href="#回归到业务业务流程，明确主线" class="headerlink" title="回归到业务业务流程，明确主线"></a>回归到业务业务流程，明确主线</h4><ul>
<li><p>页面流程一定来自于业务流程</p>
</li>
<li><p>一般业务流程中的方形部分</p>
</li>
<li><p>异常流程一般为碳层或弹窗</p>
</li>
<li><p>业务流程画得好，页面流程就很简单</p>
<p>如果你的工作中，很多时间都是用来画原型改原型的话，就要好好反思一下，你的业务流程和页面流程是不是出了问题</p>
</li>
</ul>
<p>这是上面产品的业务流程：</p>
<p><img src="http://qnfile.devzhao.com/blog/2018-11-16-163643.jpg" alt=""></p>
<p>创建优惠码，后台的页面流程:</p>
<p><img src="http://qnfile.devzhao.com/blog/2018-11-16-163821.jpg" alt=""></p>
<p>一般来说，后台的页面流程时间充沛的时候才去做。</p>
<p>使用优惠码：</p>
<p><img src="http://qnfile.devzhao.com/blog/2018-11-16-164110.jpg" alt=""></p>
<p>最后用户的流程是这样的：</p>
<p><img src="http://qnfile.devzhao.com/blog/2018-11-16-164330.jpg" alt=""></p>
<h4 id="明确页面中重点的元素"><a href="#明确页面中重点的元素" class="headerlink" title="明确页面中重点的元素"></a>明确页面中重点的元素</h4><ul>
<li><p>功能在页面中，有哪些是需要表现元素</p>
</li>
<li><p>增加异常流程的处理逻辑</p>
</li>
<li><p>增加辅助的帮主页面</p>
</li>
<li><p>考虑下游触发点</p>
</li>
</ul>
<p>上面的流程得到的结果是这样的</p>
<p><img src="http://qnfile.devzhao.com/blog/2018-11-16-164625.jpg" alt=""></p>
<h4 id="沟通和优化调整"><a href="#沟通和优化调整" class="headerlink" title="沟通和优化调整"></a>沟通和优化调整</h4><ul>
<li><p>尽可能穷举设计的页面，然后做减法</p>
</li>
<li><p>通过草图，优化调整页面关键元素</p>
</li>
<li><p>与UI、UE前端研发等多沟通有更好的效果</p>
</li>
</ul>
<h2 id="原型设计的基本原则"><a href="#原型设计的基本原则" class="headerlink" title="原型设计的基本原则"></a>原型设计的基本原则</h2><h3 id="什么是产品原型？"><a href="#什么是产品原型？" class="headerlink" title="什么是产品原型？"></a>什么是产品原型？</h3><p>回到产品画布，原型所处的位置，在产品分析过程中，最有可能出现的地方是解决方案的这个地方，因为原型就是解决方案的一种呈现，在工作流中，原型在需求评审和研发测试的时候发挥作用。</p>
<p><img src="http://qnfile.devzhao.com/blog/2018-11-16-165606.jpg" alt=""></p>
<p>简单来说，原型承载了解决方案的细化和落地.</p>
<h4 id="产品原型的概念"><a href="#产品原型的概念" class="headerlink" title="产品原型的概念"></a>产品原型的概念</h4><ul>
<li><p>产品原型，也叫线框图。使用线条、图形绘制出的产品框架</p>
</li>
<li><p>产品落地的关键点，从虚拟概念到用户解除的节点</p>
</li>
</ul>
<p>所谓的虚拟概念，就是需求和问题的转化，得到一个具体的方案。然后以产品原型的方式呈现</p>
<ul>
<li>产品经理产出的关键内容，上传下达，传达给UI、UE同事，而且会成为研发参考的重要材料。</li>
</ul>
<h4 id="五大原型设计常用工具"><a href="#五大原型设计常用工具" class="headerlink" title="五大原型设计常用工具"></a>五大原型设计常用工具</h4><ul>
<li><p><strong>笔和纸</strong></p>
</li>
<li><p><strong>笔和纸</strong></p>
</li>
<li><p><strong>笔和纸</strong></p>
</li>
<li><p><strong>笔和纸</strong></p>
</li>
<li><p><strong>原型工具：</strong> Axure、Sketch、墨刀等。</p>
</li>
</ul>
<p>非常推荐手绘原型，因为它很容易修改。一般情况下，你是用纸和笔画原型的时间要占到你整合原型绘制过程中的80%的时间。</p>
<p>原型的绘制关键是人，至于工具，选一个自己用的顺手的就可以了。</p>
<h4 id="好的原型有什么特点？"><a href="#好的原型有什么特点？" class="headerlink" title="好的原型有什么特点？"></a>好的原型有什么特点？</h4><p><img src="http://qnfile.devzhao.com/blog/2018-11-16-171239.jpg" alt=""></p>
<h3 id="如何开始原型设计"><a href="#如何开始原型设计" class="headerlink" title="如何开始原型设计?"></a>如何开始原型设计?</h3><h4 id="从原型到上限的过程"><a href="#从原型到上限的过程" class="headerlink" title="从原型到上限的过程"></a>从原型到上限的过程</h4><p><img src="http://qnfile.devzhao.com/blog/2018-11-16-171424.jpg" alt=""></p>
<h4 id="动手之前的忠告"><a href="#动手之前的忠告" class="headerlink" title="动手之前的忠告"></a>动手之前的忠告</h4><ul>
<li>产品需求没想明白之前，不要摸Axure</li>
<li>产品流程没理清楚之前，不要摸Axure</li>
<li>在你没有手绘草图之前，不要摸Axure</li>
<li>在你没把草图和Boss过了基本确定之前。不要摸Axure</li>
</ul>
<p>我们在基本方案确定之前，采用手绘，这样的方案效率是最高的，成本也是最低的。</p>
<h4 id="开始原型设计"><a href="#开始原型设计" class="headerlink" title="开始原型设计"></a>开始原型设计</h4><p><img src="http://qnfile.devzhao.com/blog/2018-11-16-171802.jpg" alt=""></p>
<p><img src="http://qnfile.devzhao.com/blog/2018-11-16-171841.jpg" alt=""></p>
<h3 id="原型设计的好习惯"><a href="#原型设计的好习惯" class="headerlink" title="原型设计的好习惯"></a>原型设计的好习惯</h3><h4 id="先手绘，再上软件"><a href="#先手绘，再上软件" class="headerlink" title="先手绘，再上软件"></a>先手绘，再上软件</h4><ul>
<li>讨论阶段，手绘成本最低，调整容易</li>
<li>大白板、A4纸都可以</li>
<li>如果是APP的设计，可以去某宝买带手机框的白纸</li>
</ul>
<h4 id="用真实比例，真实的文案"><a href="#用真实比例，真实的文案" class="headerlink" title="用真实比例，真实的文案"></a>用真实比例，真实的文案</h4><ul>
<li>真实比例、真实字号会让元素更真实</li>
<li>真实文案可以避免在需求评审的时候被质疑</li>
<li>真实模拟可能出现的极端情况，并示例清楚</li>
</ul>
<h4 id="不要上颜色-不要上颜色-不要上颜色-不要上颜色"><a href="#不要上颜色-不要上颜色-不要上颜色-不要上颜色" class="headerlink" title="不要上颜色  不要上颜色  不要上颜色  不要上颜色"></a>不要上颜色  不要上颜色  不要上颜色  不要上颜色</h4><h4 id="目录树清晰，阅读流畅"><a href="#目录树清晰，阅读流畅" class="headerlink" title="目录树清晰，阅读流畅"></a>目录树清晰，阅读流畅</h4><p><img src="http://qnfile.devzhao.com/blog/2018-11-16-172723.jpg" alt=""></p>
<h4 id="有修改记录，关键修改重新保存文件"><a href="#有修改记录，关键修改重新保存文件" class="headerlink" title="有修改记录，关键修改重新保存文件"></a>有修改记录，关键修改重新保存文件</h4><p><img src="http://qnfile.devzhao.com/blog/2018-11-16-172823.jpg" alt=""></p>
<p><img src="http://qnfile.devzhao.com/blog/2018-11-16-172845.jpg" alt=""></p>
<h4 id="紧扣需求主题，不横生枝节"><a href="#紧扣需求主题，不横生枝节" class="headerlink" title="紧扣需求主题，不横生枝节"></a>紧扣需求主题，不横生枝节</h4><ul>
<li>如果原型需要增加新功能，先考虑后端数据来源</li>
<li>不要为了“长得好看”而増加新模块</li>
</ul>
<p><img src="http://qnfile.devzhao.com/blog/2018-11-16-172957.jpg" alt=""></p>
<h4 id="三招让你成为原型设计大牛"><a href="#三招让你成为原型设计大牛" class="headerlink" title="三招让你成为原型设计大牛"></a>三招让你成为原型设计大牛</h4><ul>
<li>一定要努力画</li>
<li>一定要认真画</li>
<li>重复1和2</li>
</ul>
<h2 id="如何写需求文档"><a href="#如何写需求文档" class="headerlink" title="如何写需求文档"></a>如何写需求文档</h2><p>好多人认为需求文档很没有用，因为都没人看写了没有成就感，对项目也没有帮助。</p>
<p>实际上需求文档除了评审会议时，协助内部沟通外，它更重要的是存档的作用，它能让需求有据可查，交接更容易,更职业，跟进者了解之前的做法和过程。</p>
<h3 id="什么是需求文档"><a href="#什么是需求文档" class="headerlink" title="什么是需求文档"></a>什么是需求文档</h3><ul>
<li><p><strong>俗称：</strong></p>
</li>
<li><p><strong>俗称：</strong> MRD、PRD、BRD等等，概念不重要</p>
</li>
<li><strong>效果：</strong> 说明为什么要干，怎么干，干了后有什么效果’</li>
<li><strong>内容：</strong> 明确产品背景、需求、流程、原型、交互等内容</li>
<li><strong>谁看：</strong> 需求文档的阅读对象：设计师、研发、测试</li>
</ul>
<h3 id="需求文档有什么用？"><a href="#需求文档有什么用？" class="headerlink" title="需求文档有什么用？"></a>需求文档有什么用？</h3><p><img src="http://qnfile.devzhao.com/blog/2018-11-16-174010.jpg" alt=""></p>
<h3 id="用什么工具写需求文？"><a href="#用什么工具写需求文？" class="headerlink" title="用什么工具写需求文？"></a>用什么工具写需求文？</h3><ul>
<li>Word:传统的需求文档都是Word的，如果大的项目，我还是建议用Word的来写的</li>
<li>Axure标注：直接用axure中写标注，小功能、初创团队的首选，团队配合融洽，可以用这个</li>
</ul>
<h3 id="高颜值的需求文档有什么特点？"><a href="#高颜值的需求文档有什么特点？" class="headerlink" title="高颜值的需求文档有什么特点？"></a>高颜值的需求文档有什么特点？</h3><ul>
<li>结构： 逻辑清晰，层次分明VS没有标准过程</li>
<li>背景：需求背景描述清楚VS一上来讲功能和原型</li>
<li>流程图：业务流程、页面流程均有VS一上来讲原型</li>
<li>目标：考核指标、算法清楚VS没指标凭感觉</li>
<li>习惯：变更过程清楚VS改来爱去改回第一版</li>
</ul>
<h3 id="需求文档怎么写"><a href="#需求文档怎么写" class="headerlink" title="需求文档怎么写"></a>需求文档怎么写</h3><p><img src="http://qnfile.devzhao.com/blog/2018-11-16-174553.jpg" alt=""></p>
<h4 id="项目背景以需求分析"><a href="#项目背景以需求分析" class="headerlink" title="项目背景以需求分析"></a>项目背景以需求分析</h4><ul>
<li>水提需求》什么市场？遇到什么问题？</li>
<li>简要描述分析过程：决策过程和依据是什么？解决方案是什么？</li>
<li>有没有相关的北京数据资料</li>
<li>明确本错需求：用户、场景、需求、解决方案是什么？</li>
</ul>
<h4 id="本次需求的目的及功能"><a href="#本次需求的目的及功能" class="headerlink" title="本次需求的目的及功能"></a>本次需求的目的及功能</h4><ul>
<li>这个需求整体是什么样子的？是否要分阶段？</li>
<li>本次需求做哪些？前后关系是什么？</li>
<li>本次需求的功能清单有什么？</li>
<li>涉及的功能或页面有什么？</li>
</ul>
<h4 id="流程与所处的产品模块关系"><a href="#流程与所处的产品模块关系" class="headerlink" title="流程与所处的产品模块关系"></a>流程与所处的产品模块关系</h4><ul>
<li>业务逻辑图</li>
<li>业务流程图</li>
<li>页面流程图</li>
</ul>
<h4 id="功能细节描述"><a href="#功能细节描述" class="headerlink" title="功能细节描述"></a>功能细节描述</h4><ul>
<li>交互设计</li>
<li>原型图</li>
</ul>
<h4 id="简要的测试用例（可选）"><a href="#简要的测试用例（可选）" class="headerlink" title="简要的测试用例（可选）"></a>简要的测试用例（可选）</h4><ul>
<li>关键用用例什么</li>
<li>重点关注点</li>
<li>错误提示表等</li>
</ul>
<h4 id="考核指标"><a href="#考核指标" class="headerlink" title="考核指标"></a>考核指标</h4><ul>
<li>本次时羞怯要统计哪些指标？</li>
<li>怎么计算的？</li>
<li>怎么埋点的？</li>
</ul>
<p><a href="https://qnfile.devzhao.com/blog/090405.pdf" target="_blank" rel="noopener">三节课官网需求文档</a></p>
<p>–<br>这是我在学习产品能力的第10篇学习笔记。欢迎拍砖。</p>
<p> <a href="https://www.devzhao.com/post/95411053.html" target="_blank" rel="noopener">产品学习笔记总目录</a></p>

      
    </div>

    

    
    
    

    

    
      <div>
        <div style="padding: 10px 0; margin: 20px auto; width: 90%; text-align: center;">
  <div>坚持分享输出，感谢你的支持！</div>
  <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
    <span>打赏</span>
  </button>
  <div id="QR" style="display: none;">

    
      <div id="wechat" style="display: inline-block">
        <img id="wechat_qr" src="/images/wechatpay.jpg" alt="zhaohan 微信支付"/>
        <p>微信支付</p>
      </div>
    

    
      <div id="alipay" style="display: inline-block">
        <img id="alipay_qr" src="/images/alipay.jpg" alt="zhaohan 支付宝"/>
        <p>支付宝</p>
      </div>
    

    

  </div>
</div>

      </div>
    

    
      <div>
        <ul class="post-copyright">
  <li class="post-copyright-author">
    <strong>本文作者： </strong>zhaohan</li>
  <li class="post-copyright-link">
    <strong>本文链接：</strong>
    <a href="https://devzhao.com/post/740368dd.html" title="原型设计与PRD入门">https://devzhao.com/post/740368dd.html</a>
  </li>
  <li class="post-copyright-license">
    <strong>版权声明： </strong>本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" rel="external nofollow" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明出处！</li>
</ul>

      </div>
    

    <footer class="post-footer">
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/post/51c56068.html" rel="next" title="功能和流程入门">
                <i class="fa fa-chevron-left"></i> 功能和流程入门
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/post/94cef11e.html" rel="prev" title="最好的合作伙伴是自己能定义目标">
                最好的合作伙伴是自己能定义目标 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>


  </div>


          </div>
          

  
    <div class="comments" id="comments">
    </div>
  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="http://qnfile.devzhao.com/blog/2018-10-12-125720.jpg#/images/avatar.gif"
                alt="zhaohan" />
            
              <p class="site-author-name" itemprop="name">zhaohan</p>
              <p class="site-description motion-element" itemprop="description">教，是最好的学</p>
          </div>

          
            <nav class="site-state motion-element">
              
                <div class="site-state-item site-state-posts">
                
                  <a href="/archives/">
                
                    <span class="site-state-item-count">148</span>
                    <span class="site-state-item-name">日志</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-categories">
                  <a href="/categories/index.html">
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">33</span>
                    <span class="site-state-item-name">分类</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-tags">
                  <a href="/tags/index.html">
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">29</span>
                    <span class="site-state-item-name">标签</span>
                  </a>
                </div>
              
            </nav>
          

          

          

          
          

          
          

          
            
          
          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#页面流程与页面结构图"><span class="nav-number">1.</span> <span class="nav-text">页面流程与页面结构图</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#页面流程图"><span class="nav-number">1.1.</span> <span class="nav-text">页面流程图</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#了解页面流程图"><span class="nav-number">1.1.1.</span> <span class="nav-text">了解页面流程图</span></a><ol class="nav-child"><li class="nav-item nav-level-5"><a class="nav-link" href="#页面流程图和信息架构图的区别"><span class="nav-number">1.1.1.1.</span> <span class="nav-text">页面流程图和信息架构图的区别</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#页面流程图包含什么？"><span class="nav-number">1.1.1.2.</span> <span class="nav-text">页面流程图包含什么？</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#画页面流程图的工具"><span class="nav-number">1.1.1.3.</span> <span class="nav-text">画页面流程图的工具</span></a></li></ol></li><li class="nav-item nav-level-4"><a class="nav-link" href="#回归到业务业务流程，明确主线"><span class="nav-number">1.1.2.</span> <span class="nav-text">回归到业务业务流程，明确主线</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#明确页面中重点的元素"><span class="nav-number">1.1.3.</span> <span class="nav-text">明确页面中重点的元素</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#沟通和优化调整"><span class="nav-number">1.1.4.</span> <span class="nav-text">沟通和优化调整</span></a></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#原型设计的基本原则"><span class="nav-number">2.</span> <span class="nav-text">原型设计的基本原则</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#什么是产品原型？"><span class="nav-number">2.1.</span> <span class="nav-text">什么是产品原型？</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#产品原型的概念"><span class="nav-number">2.1.1.</span> <span class="nav-text">产品原型的概念</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#五大原型设计常用工具"><span class="nav-number">2.1.2.</span> <span class="nav-text">五大原型设计常用工具</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#好的原型有什么特点？"><span class="nav-number">2.1.3.</span> <span class="nav-text">好的原型有什么特点？</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#如何开始原型设计"><span class="nav-number">2.2.</span> <span class="nav-text">如何开始原型设计?</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#从原型到上限的过程"><span class="nav-number">2.2.1.</span> <span class="nav-text">从原型到上限的过程</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#动手之前的忠告"><span class="nav-number">2.2.2.</span> <span class="nav-text">动手之前的忠告</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#开始原型设计"><span class="nav-number">2.2.3.</span> <span class="nav-text">开始原型设计</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#原型设计的好习惯"><span class="nav-number">2.3.</span> <span class="nav-text">原型设计的好习惯</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#先手绘，再上软件"><span class="nav-number">2.3.1.</span> <span class="nav-text">先手绘，再上软件</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#用真实比例，真实的文案"><span class="nav-number">2.3.2.</span> <span class="nav-text">用真实比例，真实的文案</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#不要上颜色-不要上颜色-不要上颜色-不要上颜色"><span class="nav-number">2.3.3.</span> <span class="nav-text">不要上颜色  不要上颜色  不要上颜色  不要上颜色</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#目录树清晰，阅读流畅"><span class="nav-number">2.3.4.</span> <span class="nav-text">目录树清晰，阅读流畅</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#有修改记录，关键修改重新保存文件"><span class="nav-number">2.3.5.</span> <span class="nav-text">有修改记录，关键修改重新保存文件</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#紧扣需求主题，不横生枝节"><span class="nav-number">2.3.6.</span> <span class="nav-text">紧扣需求主题，不横生枝节</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#三招让你成为原型设计大牛"><span class="nav-number">2.3.7.</span> <span class="nav-text">三招让你成为原型设计大牛</span></a></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#如何写需求文档"><span class="nav-number">3.</span> <span class="nav-text">如何写需求文档</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#什么是需求文档"><span class="nav-number">3.1.</span> <span class="nav-text">什么是需求文档</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#需求文档有什么用？"><span class="nav-number">3.2.</span> <span class="nav-text">需求文档有什么用？</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#用什么工具写需求文？"><span class="nav-number">3.3.</span> <span class="nav-text">用什么工具写需求文？</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#高颜值的需求文档有什么特点？"><span class="nav-number">3.4.</span> <span class="nav-text">高颜值的需求文档有什么特点？</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#需求文档怎么写"><span class="nav-number">3.5.</span> <span class="nav-text">需求文档怎么写</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#项目背景以需求分析"><span class="nav-number">3.5.1.</span> <span class="nav-text">项目背景以需求分析</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#本次需求的目的及功能"><span class="nav-number">3.5.2.</span> <span class="nav-text">本次需求的目的及功能</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#流程与所处的产品模块关系"><span class="nav-number">3.5.3.</span> <span class="nav-text">流程与所处的产品模块关系</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#功能细节描述"><span class="nav-number">3.5.4.</span> <span class="nav-text">功能细节描述</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#简要的测试用例（可选）"><span class="nav-number">3.5.5.</span> <span class="nav-text">简要的测试用例（可选）</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#考核指标"><span class="nav-number">3.5.6.</span> <span class="nav-text">考核指标</span></a></li></ol></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2019</span>
  <span class="with-love" id="animate">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">zhaohan</span>

  

  
</div>


  










        
<div class="busuanzi-count">
  <!--<script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>-->

  <script async src="//cdn.busuanzi.ibruce.info/cdn/busuanzi/2.3/busuanzi.pure.mini.js"></script>

  
    <span class="site-uv" title="总访客量">
      <!-- <i class="fa fa-user-circle"></i> -->
      <i>已有</i>
      <span class="busuanzi-value" id="busuanzi_value_site_uv"></span>
      <i>位访客浏览过此网站</i>
    </span>
  

  
</div>








        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    
	
    

    
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>


























  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=6.4.2"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=6.4.2"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=6.4.2"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=6.4.2"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=6.4.2"></script>



  



  








  <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
  
  
  <script src="//unpkg.com/valine/dist/Valine.min.js"></script>
  
  <script type="text/javascript">
    var GUEST = ['nick','mail','link'];
    var guest = 'nick';
    guest = guest.split(',').filter(function (item) {
      return GUEST.indexOf(item)>-1;
    });
    new Valine({
        el: '#comments' ,
        verify: true,
        notify: false,
        appId: 'z99UqRJEaGqxYLDPSPSx5jih-gzGzoHsz',
        appKey: 'N7MTJbRdufk8MAg3yeK6Gs9U',
        placeholder: '说点什么吧...',
        avatar:'mm',
        meta:guest,
        pageSize:'10' || 10,
        visitor: false
    });
  </script>



  

  <script type="text/javascript">
    // Popup Window;
    var isfetched = false;
    var isXml = true;
    // Search DB path;
    var search_path = "search.xml";
    if (search_path.length === 0) {
      search_path = "search.xml";
    } else if (/json$/i.test(search_path)) {
      isXml = false;
    }
    var path = "/" + search_path;
    // monitor main search box;

    var onPopupClose = function (e) {
      $('.popup').hide();
      $('#local-search-input').val('');
      $('.search-result-list').remove();
      $('#no-result').remove();
      $(".local-search-pop-overlay").remove();
      $('body').css('overflow', '');
    }

    function proceedsearch() {
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay"></div>')
        .css('overflow', 'hidden');
      $('.search-popup-overlay').click(onPopupClose);
      $('.popup').toggle();
      var $localSearchInput = $('#local-search-input');
      $localSearchInput.attr("autocapitalize", "none");
      $localSearchInput.attr("autocorrect", "off");
      $localSearchInput.focus();
    }

    // search function;
    var searchFunc = function(path, search_id, content_id) {
      'use strict';

      // start loading animation
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay">' +
          '<div id="search-loading-icon">' +
          '<i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>' +
          '</div>' +
          '</div>')
        .css('overflow', 'hidden');
      $("#search-loading-icon").css('margin', '20% auto 0 auto').css('text-align', 'center');

      

      $.ajax({
        url: path,
        dataType: isXml ? "xml" : "json",
        async: true,
        success: function(res) {
          // get the contents from search data
          isfetched = true;
          $('.popup').detach().appendTo('.header-inner');
          var datas = isXml ? $("entry", res).map(function() {
            return {
              title: $("title", this).text(),
              content: $("content",this).text(),
              url: $("url" , this).text()
            };
          }).get() : res;
          var input = document.getElementById(search_id);
          var resultContent = document.getElementById(content_id);
          var inputEventFunction = function() {
            var searchText = input.value.trim().toLowerCase();
            var keywords = searchText.split(/[\s\-]+/);
            if (keywords.length > 1) {
              keywords.push(searchText);
            }
            var resultItems = [];
            if (searchText.length > 0) {
              // perform local searching
              datas.forEach(function(data) {
                var isMatch = false;
                var hitCount = 0;
                var searchTextCount = 0;
                var title = data.title.trim();
                var titleInLowerCase = title.toLowerCase();
                var content = data.content.trim().replace(/<[^>]+>/g,"");
                
                var contentInLowerCase = content.toLowerCase();
                var articleUrl = decodeURIComponent(data.url);
                var indexOfTitle = [];
                var indexOfContent = [];
                // only match articles with not empty titles
                if(title != '') {
                  keywords.forEach(function(keyword) {
                    function getIndexByWord(word, text, caseSensitive) {
                      var wordLen = word.length;
                      if (wordLen === 0) {
                        return [];
                      }
                      var startPosition = 0, position = [], index = [];
                      if (!caseSensitive) {
                        text = text.toLowerCase();
                        word = word.toLowerCase();
                      }
                      while ((position = text.indexOf(word, startPosition)) > -1) {
                        index.push({position: position, word: word});
                        startPosition = position + wordLen;
                      }
                      return index;
                    }

                    indexOfTitle = indexOfTitle.concat(getIndexByWord(keyword, titleInLowerCase, false));
                    indexOfContent = indexOfContent.concat(getIndexByWord(keyword, contentInLowerCase, false));
                  });
                  if (indexOfTitle.length > 0 || indexOfContent.length > 0) {
                    isMatch = true;
                    hitCount = indexOfTitle.length + indexOfContent.length;
                  }
                }

                // show search results

                if (isMatch) {
                  // sort index by position of keyword

                  [indexOfTitle, indexOfContent].forEach(function (index) {
                    index.sort(function (itemLeft, itemRight) {
                      if (itemRight.position !== itemLeft.position) {
                        return itemRight.position - itemLeft.position;
                      } else {
                        return itemLeft.word.length - itemRight.word.length;
                      }
                    });
                  });

                  // merge hits into slices

                  function mergeIntoSlice(text, start, end, index) {
                    var item = index[index.length - 1];
                    var position = item.position;
                    var word = item.word;
                    var hits = [];
                    var searchTextCountInSlice = 0;
                    while (position + word.length <= end && index.length != 0) {
                      if (word === searchText) {
                        searchTextCountInSlice++;
                      }
                      hits.push({position: position, length: word.length});
                      var wordEnd = position + word.length;

                      // move to next position of hit

                      index.pop();
                      while (index.length != 0) {
                        item = index[index.length - 1];
                        position = item.position;
                        word = item.word;
                        if (wordEnd > position) {
                          index.pop();
                        } else {
                          break;
                        }
                      }
                    }
                    searchTextCount += searchTextCountInSlice;
                    return {
                      hits: hits,
                      start: start,
                      end: end,
                      searchTextCount: searchTextCountInSlice
                    };
                  }

                  var slicesOfTitle = [];
                  if (indexOfTitle.length != 0) {
                    slicesOfTitle.push(mergeIntoSlice(title, 0, title.length, indexOfTitle));
                  }

                  var slicesOfContent = [];
                  while (indexOfContent.length != 0) {
                    var item = indexOfContent[indexOfContent.length - 1];
                    var position = item.position;
                    var word = item.word;
                    // cut out 100 characters
                    var start = position - 20;
                    var end = position + 80;
                    if(start < 0){
                      start = 0;
                    }
                    if (end < position + word.length) {
                      end = position + word.length;
                    }
                    if(end > content.length){
                      end = content.length;
                    }
                    slicesOfContent.push(mergeIntoSlice(content, start, end, indexOfContent));
                  }

                  // sort slices in content by search text's count and hits' count

                  slicesOfContent.sort(function (sliceLeft, sliceRight) {
                    if (sliceLeft.searchTextCount !== sliceRight.searchTextCount) {
                      return sliceRight.searchTextCount - sliceLeft.searchTextCount;
                    } else if (sliceLeft.hits.length !== sliceRight.hits.length) {
                      return sliceRight.hits.length - sliceLeft.hits.length;
                    } else {
                      return sliceLeft.start - sliceRight.start;
                    }
                  });

                  // select top N slices in content

                  var upperBound = parseInt('1');
                  if (upperBound >= 0) {
                    slicesOfContent = slicesOfContent.slice(0, upperBound);
                  }

                  // highlight title and content

                  function highlightKeyword(text, slice) {
                    var result = '';
                    var prevEnd = slice.start;
                    slice.hits.forEach(function (hit) {
                      result += text.substring(prevEnd, hit.position);
                      var end = hit.position + hit.length;
                      result += '<b class="search-keyword">' + text.substring(hit.position, end) + '</b>';
                      prevEnd = end;
                    });
                    result += text.substring(prevEnd, slice.end);
                    return result;
                  }

                  var resultItem = '';

                  if (slicesOfTitle.length != 0) {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + highlightKeyword(title, slicesOfTitle[0]) + "</a>";
                  } else {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + title + "</a>";
                  }

                  slicesOfContent.forEach(function (slice) {
                    resultItem += "<a href='" + articleUrl + "'>" +
                      "<p class=\"search-result\">" + highlightKeyword(content, slice) +
                      "...</p>" + "</a>";
                  });

                  resultItem += "</li>";
                  resultItems.push({
                    item: resultItem,
                    searchTextCount: searchTextCount,
                    hitCount: hitCount,
                    id: resultItems.length
                  });
                }
              })
            };
            if (keywords.length === 1 && keywords[0] === "") {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>'
            } else if (resultItems.length === 0) {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>'
            } else {
              resultItems.sort(function (resultLeft, resultRight) {
                if (resultLeft.searchTextCount !== resultRight.searchTextCount) {
                  return resultRight.searchTextCount - resultLeft.searchTextCount;
                } else if (resultLeft.hitCount !== resultRight.hitCount) {
                  return resultRight.hitCount - resultLeft.hitCount;
                } else {
                  return resultRight.id - resultLeft.id;
                }
              });
              var searchResultList = '<ul class=\"search-result-list\">';
              resultItems.forEach(function (result) {
                searchResultList += result.item;
              })
              searchResultList += "</ul>";
              resultContent.innerHTML = searchResultList;
            }
          }

          if ('auto' === 'auto') {
            input.addEventListener('input', inputEventFunction);
          } else {
            $('.search-icon').click(inputEventFunction);
            input.addEventListener('keypress', function (event) {
              if (event.keyCode === 13) {
                inputEventFunction();
              }
            });
          }

          // remove loading animation
          $(".local-search-pop-overlay").remove();
          $('body').css('overflow', '');

          proceedsearch();
        }
      });
    }

    // handle and trigger popup window;
    $('.popup-trigger').click(function(e) {
      e.stopPropagation();
      if (isfetched === false) {
        searchFunc(path, 'local-search-input', 'local-search-result');
      } else {
        proceedsearch();
      };
    });

    $('.popup-btn-close').click(onPopupClose);
    $('.popup').click(function(e){
      e.stopPropagation();
    });
    $(document).on('keyup', function (event) {
      var shouldDismissSearchPopup = event.which === 27 &&
        $('.search-popup').is(':visible');
      if (shouldDismissSearchPopup) {
        onPopupClose();
      }
    });
  </script>





  

  
  <script>
    
    function addCount(Counter) {
      var $visitors = $(".leancloud_visitors");
      var url = $visitors.attr('id').trim();
      var title = $visitors.attr('data-flag-title').trim();

      Counter('get', '/classes/Counter', { where: JSON.stringify({ url }) })
        .done(function ({ results }) {
          if (results.length > 0) {
            var counter = results[0];
            
            Counter('put', `/classes/Counter/${counter.objectId}`, JSON.stringify({ time: { "__op":"Increment", "amount":1 } }))
            
            .done(function () {
                  var $element = $(document.getElementById(url));
                  $element.find('.leancloud-visitors-count').text(counter.time + 1);
            })
            
            .fail(function ({ responseJSON }) {
                console.log('Failed to save Visitor num, with error message: ' + responseJSON.error);
            })
          } else {
            
              Counter('post', '/classes/Counter', JSON.stringify({ title: title, url: url, time: 1}))
                .done(function () {
                  var $element = $(document.getElementById(url));
                  $element.find('.leancloud-visitors-count').text(1);
                })
                .fail(function () {
                  console.log('Failed to create');
                });
            
          }
        })
      .fail(function ({ responseJSON }) {
        console.log('LeanCloud Counter Error:' + responseJSON.code + " " + responseJSON.error);
      });
    }
    

    $(function() {
      $.get('https://app-router.leancloud.cn/2/route?appId=' + "z99UqRJEaGqxYLDPSPSx5jih-gzGzoHsz")
        .done(function ({ api_server }) {
          var Counter = function (method, url, data) {
            return $.ajax({
              method: method,
              url: `https://${api_server}/1.1${url}`,
              headers: {
                'X-LC-Id': "z99UqRJEaGqxYLDPSPSx5jih-gzGzoHsz",
                'X-LC-Key': "N7MTJbRdufk8MAg3yeK6Gs9U",
                'Content-Type': 'application/json',
              },
              data: data,
            });
          };
          
          addCount(Counter);
          
        })
    });
  </script>



  

  
<script>
(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';        
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>


  

  
  

  

  

  

  

  

</body>
</html>
